package com.googlecode.bip.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import javax.naming.NamingException;
import com.googlecode.bip.dao.utils.Listable;
import com.googlecode.bip.entity.IReferent;
import com.googlecode.bip.entity.Referent;

/**
 * TODO: Doc!
 *
 * @author Claude CHOISNET
 */
public abstract class ReferentDAO
        implements Listable<IReferent>
{
    private static final long serialVersionUID = 1L;

    @Override //Listable<IReferent>
    public IReferent newInstance(final ResultSet rSet )
        throws SQLException
    {
        return new Referent().set( rSet );
    }

    /**
     * TODO: Doc!
     *
     * @param idreferent
     * @return
     * @throws NamingException
     * @throws SQLException
     */
    public abstract IReferent findReferent(
        int  idreferent
        ) throws NamingException, SQLException;

    /**
     * TODO: Doc!
     *
     * @return
     * @throws NamingException
     * @throws SQLException
     */
    public abstract List<IReferent> findReferentList()
        throws NamingException, SQLException;

}

